/* 
 * File:   QSimulationSpeedSlider.h
 * Author: jcrada
 *
 * Created on April 14, 2009, 1:05 AM
 */

#ifndef _QSIMULATIONSPEEDSLIDER_H
#define	_QSIMULATIONSPEEDSLIDER_H

#include <QtGui/QSlider>
#include <math.h>
namespace jcrada {

    class QSimulationSpeedSlider : public QSlider {
    private:
        int _max_value;
        int _min_value;
    protected:

        virtual void mouseDoubleClickEvent( QMouseEvent* e ) {
            setValue((abs(_max_value) + abs(_min_value)) / 2);
        }
    public:

        QSimulationSpeedSlider( QWidget *parent = 0 ) : QSlider( parent ),
        _max_value( 200 ),
        _min_value( 0 ) {

        }
    };
}

#endif	/* _QSIMULATIONSPEEDSLIDER_H */

